<?php /* SVN: $Id: $ */ ?>
<div class="adaptiveTransactionLogs index js-response">
<?php echo $this->element('paging_counter');?>
<table class="list">
    <tr>
        <th class="actions"><?php echo __l('Actions');?></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Created'),'created');?></div></th>
		<th><div class="js-pagination"><?php echo $this->Paginator->sort('class');?></div></th>
		<th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Transaction'),'transaction_id');?></div></th>
        <th class="dr"><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Amount'),'amount').' ('.Configure::read('site.currency').')';?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Email'),'email');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Primary'),'primary');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Invoice'),'invoice_id');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Refunded Amount'),'refunded_amount');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Pending Refund'),'pending_refund');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Sender Transaction'),'sender_transaction_id');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Sender Transaction Status'),'sender_transaction_status');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Timestamp'),'timestamp');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Ack'),'ack');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Correlation'),'correlation_id');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Build'),'build');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Currency Code'),'currency_code');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Sender Email'),'sender_email');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Status'),'status');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Tracking'),'tracking_id');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Pay Key'),'pay_key');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Action Type'),'action_type');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Fees Payer'),'fees_payer');?></div></th>
		<th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Memo'),'memo');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Reverse All Parallel Payments On Error'),'reverse_all_parallel_payments_on_error');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Refund Status'),'refund_status');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Refund Net Amount'),'refund_net_amount');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Refund Fee Amount'),'refund_fee_amount');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Refund Gross Amount'),'refund_gross_amount');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Total Of All Refunds'),'total_of_all_refunds');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Refund Has Become Full'),'refund_has_become_full');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Encrypted Refund Transaction'),'encrypted_refund_transaction_id');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Refund Transaction Status'),'refund_transaction_status');?></div></th>
    </tr>
<?php
if (!empty($adaptiveTransactionLogs)):

$i = 0;
foreach ($adaptiveTransactionLogs as $adaptiveTransactionLog):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td class="actions dl">

            <div class="action-block">
                <span class="action-information-block">
                    <span class="action-left-block">&nbsp;&nbsp;</span>
                        <span class="action-center-block">
                            <span class="action-info">
                                <?php echo __l('Action');?>
                             </span>
                        </span>
                    </span>
                    <div class="action-inner-block">
                    <div class="action-inner-left-block">
                        <ul class="action-link clearfix">
                            <li><?php echo $this->Html->link(__l('View'), array('controller' => 'adaptive_transaction_logs', 'action' => 'view', $adaptiveTransactionLog['AdaptiveTransactionLog']['id']), array('class' => 'view', 'title' => __l('View')));?></li>
                        </ul>
    					</div>
    					<div class="action-bottom-block"></div>
    				  </div>
              </div>
        </td>
		<td><?php echo $this->Html->cDateTimeHighlight($adaptiveTransactionLog['AdaptiveTransactionLog']['created']);?></td>		
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['class']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['transaction_id']);?></td>
		<td class="dr"><?php echo $this->Html->cCurrency($adaptiveTransactionLog['AdaptiveTransactionLog']['amount']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['email']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['primary']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['invoice_id']);?></td>
		<td><?php echo $this->Html->cFloat($adaptiveTransactionLog['AdaptiveTransactionLog']['refunded_amount']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['pending_refund']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['sender_transaction_id']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['sender_transaction_status']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['timestamp']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['ack']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['correlation_id']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['build']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['currency_code']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['sender_email']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['status']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['tracking_id']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['pay_key']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['action_type']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['fees_payer']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['memo']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['reverse_all_parallel_payments_on_error']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['refund_status']);?></td>
		<td><?php echo $this->Html->cFloat($adaptiveTransactionLog['AdaptiveTransactionLog']['refund_net_amount']);?></td>
		<td><?php echo $this->Html->cFloat($adaptiveTransactionLog['AdaptiveTransactionLog']['refund_fee_amount']);?></td>
		<td><?php echo $this->Html->cFloat($adaptiveTransactionLog['AdaptiveTransactionLog']['refund_gross_amount']);?></td>
		<td><?php echo $this->Html->cFloat($adaptiveTransactionLog['AdaptiveTransactionLog']['total_of_alll_refunds']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['refund_has_become_full']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['encrypted_refund_transaction_id']);?></td>
		<td><?php echo $this->Html->cText($adaptiveTransactionLog['AdaptiveTransactionLog']['refund_transaction_status']);?></td>
	</tr>
<?php
    endforeach;
else:
?>
	<tr>
		<td colspan="36" class="notice"><?php echo __l('No Adaptive Transaction Logs available');?></td>
	</tr>
<?php
endif;
?>
</table>

<?php if (!empty($adaptiveTransactionLogs))  : ?>
<div class="clearfix">
 <div class="js-pagination grid_right">
    <?php  echo $this->element('paging_links');?>
  </div>
  </div>
 <?php endif; ?>
</div>